package com.click.common;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum ErrorCode {
    
    SUCCESS(200, "操作成功"),
    
    // 系统错误
    INTERNAL_ERROR(500, "系统内部错误"),
    PARAM_ERROR(400, "参数错误"),
    NOT_FOUND(404, "资源不存在"),
    
    // 业务错误
    USER_NOT_LOGIN(1001, "用户未登录"),
    WX_LOGIN_FAILED(1002, "微信登录失败"),
    WX_SESSION_INVALID(1003, "微信会话无效"),
    
    // 数据错误
    DATA_NOT_EXIST(2001, "数据不存在"),
    DATA_ALREADY_EXIST(2002, "数据已存在"),
    
    // 权限错误
    PERMISSION_DENIED(3001, "权限不足");
    
    private final int code;
    private final String msg;
}